<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../common.jsp"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
</head>

<body>
	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">患者管理</a></li>
	    <li><a href="#">患者基本信息</a></li>
	    </ul>
	 </div>
<!-- 添加用户form    此节点内部的内容会在弹出框内显示,默认隐藏此节点   -->
    <div id="pat_content" class="hidden" style="display:none;">
      <form id="patForm" class="form-horizontal" method="post" action="">
        <div class="row">
      		 <div class="control-group span12">
            	<label class="control-label">病历号:</label>
            	<div class="controls">
              		<input type="text" class="input-normal control-text" name="mrn" id="pat_mrn" value="系统自动生成" readonly="readonly" style="background-color:#F0F0F0;">
              		<span class="validate_color">*</span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="control-group span14">
            <label class="control-label">姓名:</label>
            <div class="controls">
              	<input type="text" class="input-normal control-text" name="name" id="pat_name">
              	<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span12"> 
            <label class="control-label">身份证:</label>
            <div class="controls">
			  		<input type="text" class="input-normal control-text" name="id_card" id="pat_id_card" >
			  		<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span12">
          	 <label class="control-label">性别:</label>
          	 <div class="controls">
 				<select class="input-normal" name="sex" id="pat_sex" > 
               		 <option value="男">男</option>
               		 <option>女</option>
             	</select>
             	<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span12">
            <label class="control-label">年龄:</label>
            <div class="controls">
			   		<input type="text" class="input-normal control-text" name="age" id="pat_age" >
			   		<span class="validate_color">*</span>
            </div>
          </div>
          <div class="control-group span12">
            <label class="control-label">家庭住址:</label>
            <div class="controls">
			   		<input type="text" class="input-normal control-text" name="addr" id="pat_addr" >
			   		<span class="validate_color">*</span>
            </div>
          </div>
           <div class="control-group span12">
            <label class="control-label">电话:</label>
            <div class="controls">
			   		<input type="text" class="input-normal control-text" name="phone" id="pat_phone" >
			   		<span class="validate_color">*</span>
            </div>
          </div>
        </div>
      </form>
    </div>

    <div class="rightinfo" >
    
    <div class="tools">
    
    	<ul class="toolbar">
         <li id="add_Pat" class="pmsncontrol"><span><img src="${path}/images/t01.png" /></span>添加</li>
         <li class="pmsncontrol" onclick="exportPat()"><span><img src="${path}/images/t05.png" ></span>导出</li>
         <li class="pmsncontrol" onclick="del_pat('patSelectCbx')"><span><img src="${path}/images/t03.png" ></span>删除</li>       
        </ul>
       	
       	<ul class="toolbar1">
    	 <li onclick="showPatPageDataList(1)"><span><img src="${path}/images/t04.png" /></span>查询</li>
        </ul>
       	<ul class="toolbar2">
       	 <li><input type="text" id="pat_search_mrn" value="${chaxun}" style="margin-top:3px;"></li>
       	</ul>
        
        
    
    </div>
    <table class="tablelist" id="patTable">
    	<thead>
    	<tr>
        <th class="cbx"><input name="" type="checkbox" value="" id="patSelectAll" onclick="selectAllCheck('patSelectAll','patSelectCbx')"/></th>
        <th>病历号</th>
        <th>姓名</th>
		<th>身份证号码</th>
        <th>性别</th>
        <th>年龄</th>
        <th>家庭住址</th>
        <th>联系电话</th>
        <th>登记日期</th>
        <th class="operate">操作</th>
        </tr>
        </thead>
  	 	<c:if test="${!empty patPageInfo}">
  	 		<c:forEach items="${patBeanList }" var="patList">
  	 			<tr>
			        <td><input name="patSelectCbx" id='pat_${patList.id}' type="checkbox" value="" onclick="cbxCheck('patSelectAll','patSelectCbx');"/></td>
			        <td title="${patList.mrn}">${patList.mrn}</td>
			        <td title="${patList.name}">${patList.name}</td>
					<td title="${patList.id_card }">${patList.id_card }</td>
					<td title="${patList.sex }">${patList.sex }</td>
					<td title="${patList.age }">${patList.age }</td>
					<td title="${patList.addr }">${patList.addr }</td>
					<td title="${patList.phone }">${patList.phone }</td>
					<td title="${patList.dateString }">${patList.dateString }</td>
			        <td>
			        	<ul class="tabletoolbar"  id='pat_operate${patList.id}'>
			        		<li class="pmsncontrol" onclick="patEdit('${patList.mrn}')"><span><img src="${path}/images/table_t01.png"></span>编辑</li>
			        		<li class="pmsncontrol" onclick="messageAlert(4,'你确定要删除选择的用户吗？',function(){choose_open,deletePat(${patList.id})},1)"><span><img src="${path}/images/table_t02.png"></span>删除</li>
			        	</ul>	
      				</td>
       			 </tr> 
  	 		</c:forEach>
  	 	</c:if> 
        </tbody>
    </table>
	
    <div id="pat_box">
    </div>
    
    </div>
    <script type="text/javascript">
	$(function(){
		patManagerInit();
		if(window.parent.currentUserPmsn == normalLimit){
			pmsnControl();
		}
		getDivPage("pat",'${patPageInfo}',showPatPageDataList);
	});
	</script>
</body>
</html>